package com.realphim.app.util;

import java.util.ArrayList;
import java.util.List;

import com.realphim.app.model.ModelPhim;

/**
 * Save value be use like cache
 * 
 * @author Tien
 * 
 */

public class MyCache {

    private static MyCache instance;

    public List<ModelPhim> listPhimFeature;

    public ModelPhim currentPhim;

    public static void initInstance() {
        if (instance == null) {
            // Create the instance
            instance = new MyCache();
        }
    }

    public static MyCache getInstance() {
        // Return the instance
        return instance;
    }

    private MyCache() {
        // Constructor hidden because this is a singleton
    }

    public void customSingletonMethod() {
        listPhimFeature = new ArrayList<ModelPhim>();
    }
}
